﻿using System;
using System.ComponentModel;
using Modules.System.EarlyWarning;
using PetaPoco;
using PmSoft;
using PmSoft.Caching;

namespace Modules
{
    /// <summary>
    /// 预警记录表
    ///</summary>
    [TableName("sys_early_warning")]
    [Description("预警信息表")]
    [PrimaryKey("Id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class SysEarlyWarning:IEntity
    {
        /// <summary>
        /// 主键 
        ///</summary>
         [Column("id"  )]
         public int Id { get; set; }
        /// <summary>
        /// 编号 
        ///</summary>
         [Column("code"  )]
         public string Code { get; set; }
        /// <summary>
        /// 租户 
        ///</summary>
         [Column("tenant"  )]
         public 预警租户 Tenant { get; set; }
        /// <summary>
        /// 对象表id 
        ///</summary>
         [Column("object_id"  )]
         public string ObjectId { get; set; }
        /// <summary>
        /// 预警类型 
        ///</summary>
         [Column("warning_type"  )]
         public 预警类型 WarningType { get; set; }
        /// <summary>
        /// 预警内容 
        ///</summary>
         [Column("remark"  )]
         public string Remark { get; set; }
        /// <summary>
        /// 预警时间 
        ///</summary>
         [Column("create_time"  )]
         public DateTime CreateTime { get; set; }

    #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

      #endregion

    }
}
